Manjaro(Linux分支)+Windows 10双系统,启动时Windows 10启动项丢失,恢复方法及原因分析

您所在的位置:网站首页 双系统 启动项 Manjaro(Linux分支)+Windows 10双系统,启动时Windows 10启动项丢失,恢复方法及原因分析

Manjaro(Linux分支)+Windows 10双系统,启动时Windows 10启动项丢失,恢复方法及原因分析

2023-06-25 18:47| 来源: 网络整理| 查看: 265

Manjaro(Linux分支)+Windows 10双系统,启动时Windows 10启动项丢失,恢复方法及原因分析

在Linux终端下键入fdisk -l 命令列出所有分区,根据分区的类型以及大小应该可以区分出不同分区的作用: fdisk -l 本次使用的是笔记本电脑,只有一块硬盘,对应的硬盘编号为hd0, 划分硬盘时Windows 10用的是100G的分区,对应的是/dev/sda2,sda1只有579M,是引导分区,也有Windows启动入口,对应的hd0,msdos1和hd0,msdos2都可以作为引导入口,用os-prober命令可以进一步确认。 [thinkpad]# os-prober /dev/sda1:Windows 10:Windows:chain /dev/sda2:Windows 10:Windows1:chain 解决方案一:手工修改 修改/etc/grub.d/40_custom文件,在文件的末尾加上如下语句 vim /etc/grub.d/40_custom menuentry ‘Windows 10 Home Edition’ { insmod part_msdos insmod ntfs set root=’hd0,msdos1’   chainloader +1 } #本例中由于sda1和sda2都是windows引导区set root=’hd0,msdos2’也可以达到同样的效果。 编辑完/etc/grub.d/40_custom,保存退出,然后用update-grub,更新配置,重启系统reboot,就看到新增加的Windows 10 Home Edition的启动选项了。 执行update-grub后,打开/boot/grub/grub.cfg文件,查看40_custom项下配置的变化。 /boot/grub/grub.cfg

解决方案二:系统恢复 根因:之所以出现这种情况是由于Manjaro-Team出于安全方面的考虑在新发布的补丁中禁用了操作系统自动检测选项,从而丢失了Windows的启动入口。 In the recent updates the Manjaro-Team disabled os-prober by default stating “security issues”. When I read the announcements it just linkes to some webpages stating “borderline atack vectors”. You can try to start Manjaro with /etc/grub.d/40_custom and commenting out os-prober. This will start the bootloader of Manjaro afaik and not manjaro entry direct. To restore the old behavior, open a terminal and issue sudo echo GRUB_DISABLE_OS_PROBER=false >> /etc/default/grub && sudo update-grub 恢复方法:在文件**/etc/default/grub**的末尾添加一行,GRUB_DISABLE_OS_PROBER=false 保存退出,然后用sudo update-grub更新grub配置文件,然后重启即可。 执行update-grub后,打开/boot/grub/grub.cfg文件,查看30_os-prober项下配置的变化。 /boot/grub/grub.cfg

参考文献:https://forum.manjaro.org/t/grub2-why-is-os-prober-now-disabled-by-default/57599/3 三个重要文件:/etc/grub.d/40_custom、/etc/default/grub、/boot/grub/grub.cfg 三个重要命令:fdisk -l、os-prober、update-grub



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3